﻿@model HelperMethods.Models.Person
@{
    ViewBag.Title = "CreatePerson";
    Html.EnableClientValidation(false);
}
<h2>CreatePerson</h2>
@*data_formType is then written as data-formType*@
@using (Html.BeginRouteForm("FormRoute", new { }, FormMethod.Post, new { @class = "personClass", data_formType = "person" }))
{
    
    //Html.Display("FirstName")
    //Renders a read-only view of the specified
    //model property
    
    <div class="dataElem">
        <label>PersonId</label>
        @Html.Editor("PersonId") @*sets input[type] = number (html5 specification)*@
    </div>
    <div class="dataElem">
        <label>First Name</label>
        @Html.Editor("FirstName")
    </div>
    <div class="dataElem">
        <label>Last Name</label>
        @Html.EditorFor(m => m.LastName)
    </div>
    <div class="dataElem">
        <label>Role</label>
        @Html.EditorFor(m => m.Role)
    </div>
    <div class="dataElem">
        <label>Birth Date</label>
        @Html.EditorFor(m => m.BirthDate) @*sets input[type] = datetime (html5 specification)*@
    </div>
    <input type="submit" value="Submit" />
}